<template>
    <div>
        <InputNumber class="mr-2" :value="zaoyuVal"></InputNumber><span>个月</span>
    </div>
</template>

<style scoped>

</style>


<script>
export default {
    name: 'DateZaoYu',
    props: {
        val: {
            type: String,
            default: '',
            required: true
        }
    },
    computed: {
        zaoyuVal : function(){
            let result = '';
            if(this.val){
                // 日期早于判断工具(monthBefore)的determinationData格式为{"monthBefore":15}
                let valObj = JSON.parse(this.val);
                if(valObj.monthBefore){
                    result = valObj.monthBefore
                }
            }
            return result;
        }
    }
}
</script>
